import request from '@/utils/request'

// 查询采购订单列表
export function listGoodsPurchase(query) {
  return request({
    url: '/webshop/GoodsPurchase/list',
    method: 'get',
    params: query
  })
}
// 校验Sn
export function checkPurchaseSn(purchaseSn) {
  return request({
    url: '/webshop/GoodsPurchase/checkSn/'+purchaseSn,
    method: 'get'
  })
}
// 查询采购订单列表
export function selectGoodsPurchaseList() {
  return request({
    url: '/webshop/GoodsPurchase',
    method: 'get'
  })
}

// 查询采购订单详细
export function getGoodsPurchase(purchaseId) {
  return request({
    url: '/webshop/GoodsPurchase/' + purchaseId,
    method: 'get'
  })
}

// 新增采购订单
export function addGoodsPurchase(data) {
  return request({
    url: '/webshop/GoodsPurchase',
    method: 'post',
    data: data
  })
}

// 修改采购订单
export function updateGoodsPurchase(data) {
  return request({
    url: '/webshop/GoodsPurchase',
    method: 'put',
    data: data
  })
}

// 删除采购订单
export function delGoodsPurchase(purchaseId) {
  return request({
    url: '/webshop/GoodsPurchase/' + purchaseId,
    method: 'delete'
  })
}
